﻿function ReceivedDataIMG(SelectValue) {
    ed = $('.textAreaMceAdvance').attr('id');
    html = "<img src='" + SelectValue + "' alt='' />";
    tinyMCE.execInstanceCommand(ed, "mceInsertContent", false, html);
    return false;
}

function ReceivedDataAVI(SelectValue) {
    ed = $('.textAreaMceAdvance').attr('id');
    html = '<object classid="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" width="228" height="168" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701">';
    html += '<param name="url" value="' + SelectValue + '" />';
    html += '<embed type="application/x-mplayer2" width="228" height="168" src="' + SelectValue + '"></embed></object>';
    tinyMCE.execInstanceCommand(ed, "mceInsertContent", false, html);
    return false;
}

function ReceivedDataFLV(SelectValue) {
    ed = $('.textAreaMceAdvance').attr('id');
    html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="228" height="168" id="vid2">';
    html += '<param name="movie" value="../player.swf" />';
    html += '<param name="quality" value="high" />';
    html += '<embed allowfullscreen="true" src="../player.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="video=' + SelectValue + '" type="application/x-shockwave-flash" width="228" height="168" name="vid2"></embed></object>';
    tinyMCE.execInstanceCommand(ed, "mceInsertContent", false, html);
    return false;
}

function ReceivedDataSWF(SelectValue) {
    ed = $('.textAreaMceAdvance').attr('id');
    html = '<object width="228" height="168" data="' + SelectValue + '" type="application/x-shockwave-flash">';
    html += '<param name="src" value="' + SelectValue + '" />';
    html += '</object>';
    tinyMCE.execInstanceCommand(ed, "mceInsertContent", false, html);
    return false;
}